using namespace anima;
creatures::creatures(){try{
int test_1=std::rand()%10000;
int test_2=std::rand()%10000;
int test_3=std::rand()%10000;
if (test_1==test_2==test_3) throw{creatures_errors::seed_for_random();}
}catch (const creatures_errors& error){
error.seed_for_random();
}
}
virtual std::string creatures::representation(creatures& Creatures)const; // C++ String
virtual char* creatures::printf(creatures& Creatures); //C-Like string


inline int& creatures::get_x() const {return x;}
inline int& creatures::get_y() const {return y;}
inline void creatures::add_x()       {x++;}
inline void creatures::remove_x()    {x--;}
inline void creatures::set_x(int number_x) {x=number;}
inline void creatures::set_y(int number_y) {x=number;}
inline void creatures::add_y()             {y++;}
inline void creatures::remove_y()          {y--;}
inline int& creatures::get_hunger() const           {return hunger;}   
inline void creatures::set_hunger(int number_hunger){hunger=number_hunger;}
virtual void creatures::add_hunger()		    {hunger++;}
virtual void creatures::remove_hunger()		    {hunger--;}
inline int& creatures::get_vitality() const	         {return vitality;}
inline void creatures::set_vitality(int number_vitality) {vitality=number_vitality;}
virtual void creatures::add_vitality()		         {vitality++;}
virtual void creatures::remove_vitality()	         {vitality--;}
inline int& creatures::get_force() const	    {return force;}
inline void creatures::set_force(int number_force)  {force=number_force;}
virtual void creatures::add_force()                 {force++;}
virtual void creatures::remove_force()              {force--;}
inline int& creatures::get_instinct() const              {return instinct;}
inline void creatures::set_instinct(int number_instinct) {instinct=number_instinct;}
virtual void creatures::add_instinct()		         {instinct++;}
virtual void creatures::remove_instinct()		 {instinct--;}

virtual std::string creatures::used_skill() const;

creatures creatures::operator+(creatures male, creatures female){

creatures Creatures;
if(Creatures.female=static_cast<bool>(rand()%2) )Creatures.male=false;  else Creatures.male=true;
Creatures.x=female.x;
Creaures.y=female.y;
Creatures.years=0;
Creatures.months=0;
Creatures.days=0;
hunger=0;
instinct = std::rand() % 100;
if (Creatures.male){   
int randomNumber20 = std::rand() % 21;   
int finalNumber20 = randomNumber - 10;
int randomNumber30 = std::rand() % 31; 
int finalNumber30 = randomNumber - 15; 
if(male.vitality>=50&&male.vitality<60) {Creatures.force=male.force+(finalNumber20) };
if(male.vitality>=60&&male.vitality<70) {Creatures.force=male.force+(finalNumber30) };
//to be finished
}
};


std::ostream& creatures::operator<<(ostream&, creatures Spectator);
std::istream& creatures::operator>>(istream&, creatures Actor);


